const router = require('koa-router')(),
      crawlerController = require('../controllers/Crawler'),
      loginCheck = require('../middlewares/loginCheck');

router.prefix('/crawler');//添加默认的路由

//爬取百度阅读首页轮播图
router.get('/crawl_slider_data', loginCheck, crawlerController.crawlSliderData); 
//爬取首页轮播图下方的other-link信息(广告图) //poster是招贴画;海报;巨幅装饰画;的意思
router.get('/crawl_poster_book', loginCheck, crawlerController.crawlPosterBook);
//爬取百度阅读里面的'推荐书本'
router.get('/crawl_recom_book', loginCheck, crawlerController.crawlRecomBook);
//全部书本
router.get('/crawl_all_book_data', loginCheck, crawlerController.crawlAllBooksData);
//明星老师
router.get('/crawl_author', loginCheck, crawlerController.crawlAuthor);


module.exports = router
